package com.newway.back.entity.approval;

import com.alibaba.fastjson.JSONObject;
import com.baomidou.mybatisplus.annotation.*;
import com.baomidou.mybatisplus.extension.handlers.FastjsonTypeHandler;
import com.newway.back.enums.ApprovalStatusEnum;
import lombok.Data;

import java.time.LocalDateTime;

@Data
@TableName("approval_instances")
public class ApprovalInstance {
    @TableId(type = IdType.AUTO)
    private Integer instanceId;

    private Integer templateId;
    private Integer templateVersion;
    private String title;
    private Integer applicantId;

    @TableField(typeHandler = FastjsonTypeHandler.class)
    private JSONObject formData;  // 使用Fastjson处理JSON

   /* @EnumValue
    private ApprovalStatusEnum currentStatus;*/  // 枚举见下方

    private String currentStatus;

    private Integer currentNodeId;
    private LocalDateTime createdAt;
}